package com.qf.pojo;

/**
 * @author Mr.Liu
 * @date 2021/11/27 16:30
 * 订单项实体
 */

public class OrderItem {
    private String itemid;//订单项编号
    private Integer count;//订单项包含的商品数量
    private Double subtatal = 0.0;//订单项小计金额
    private Product product;//订单项中的商品实体
    private Order order;//订单项属于哪个订单

    public String getItemid() {
        return itemid;
    }

    public void setItemid(String itemid) {
        this.itemid = itemid;
    }

    public Integer getCount() {
        return count;
    }

    public void setCount(Integer count) {
        this.count = count;
    }

    public Double getSubtatal() {
        return (this.product.getShop_price())*(this.count);
    }

    public void setSubtatal(Double subtatal) {
        this.subtatal = subtatal;
    }

    public Product getProduct() {
        return product;
    }

    public void setProduct(Product product) {
        this.product = product;
    }

    public Order getOrder() {
        return order;
    }

    public void setOrder(Order order) {
        this.order = order;
    }


}
